//
//  MusicTableViewCell.m
//  EDPS
//
//  Created by dllo on 15/12/1.
//  Copyright © 2015年 张维扬. All rights reserved.
//

#import "MusicTableViewCell.h"
#import "UIImageView+WebCache.h"

@interface MusicTableViewCell ()

@property (nonatomic,retain) UIImageView *LeftImageView;
@property (nonatomic,retain) UILabel *Titlelabel;

@end

@implementation MusicTableViewCell


- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self)
    {
        [self creatViews];
    }
    return self;
}

- (void)creatViews
{
    self.LeftImageView = [[UIImageView alloc] initWithFrame:CGRectMake(10, 10, 100, 100)];
    self.LeftImageView.layer.cornerRadius = 20;
    self.layer.masksToBounds = YES;
    [self.contentView addSubview:self.LeftImageView];
    
    
    self.Titlelabel = [[UILabel alloc]initWithFrame:CGRectMake(120, 10, ScreenWidth - 130, 100)];
    [self.contentView addSubview:self.Titlelabel];
    
}

- (void)setSingleModel:(SingleModel *)singleModel
{
    _singleModel = singleModel;
    [self.LeftImageView sd_setImageWithURL:[NSURL URLWithString:_singleModel.coverLarge] placeholderImage:[UIImage imageNamed:@"img_my_bg@2x.jpg"]];
    self.Titlelabel.text = singleModel.title;
    self.Titlelabel.textColor = [UIColor blackColor];
    
}



@end
